#region Copyright (c) Nicola Gallo All rights reserved.
/*
 * All rights reserved. Reproduction of trasmission of this file, or a portion thereof,
 * is forbidden without prior written permission of Nicola Gallo.
 * 
 * Author: Nicola Gallo
 * Date: 09/04/2011
 * 
 * */
#endregion
namespace PrismMVC.ModuleA.Views
{
    //.NET References
    using System;
    using System.Linq;
    using System.Windows.Controls;

    //Microsoft References
    using Microsoft.Practices.Prism.Events;
    using Microsoft.Practices.Prism.Logging;
    using Microsoft.Practices.Unity;

    //PrismMVC References
    using PrismMVC.ModuleA.ViewModels;
    using PrismMVC.Shell.Containers;

    /// <summary>
    /// Persons definition.
    /// </summary>
    public partial class PersonsView : View
    {
        /// <summary>
        /// Creates a new instance of <see cref="PersonsView"/>.
        /// </summary>
        /// <param name="unityContainer">Unity container.</param>
        /// <param name="loggerFacade">Logger facade.</param>
        /// <param name="eventAggregator">Event aggregator.</param>
        /// /// <param name="personsPM">Presentation model.</param>
        public PersonsView(IUnityContainer unityContainer, ILoggerFacade loggerFacade, IEventAggregator eventAggregator, PersonsPM personsPM)
            : base(unityContainer, loggerFacade, eventAggregator)
        {
            InitializeComponent();

            this.PresentationModels.Add(personsPM);

            // Set the PresentationModel as this View's data context.
            this.DataContext = this.PresentationModels.FirstOrDefault();
        }
    }
}